Skip to content

Conversation

@hi-ogawa
Copy link
Contributor

@hi-ogawa hi-ogawa commented Jul 21, 2025

Description

Inspired by React Router's integration test (example), this PR setups more scale-able approach of testing different scenarios based on small number of templates.

The file structure looks like this:

  • examples/e2e/temp
    • This is a base directory of test project. For example, this PR uses examples/e2e/temp/react-compiler, which is setup by setupInlineFixture utility. It uses examples/starter as a base project and additionally it replaces vite.config.ts to setup react compiler plugin.
    • This whole directory is ignored, but each test project is run-able locally e.g. by
      pnpm -C packages/plugin-rsc/examples/e2e/temp/react-compiler dev
  • examples/e2e/package.json
    • The dependencies for temp projects are listed here. For example, it has babel-plugin-react-compiler for the test above.

I likely do more iterations, but for now, this PR migrates custom base test and react-compiler test to this system. This allows cutting down test times since they only test based on examples/starter and not the huge examples/basic.

@hi-ogawa hi-ogawa marked this pull request as ready for review July 21, 2025 09:58
@hi-ogawa hi-ogawa merged commit 5167266 into main Jul 21, 2025
21 checks passed
@hi-ogawa hi-ogawa deleted the 07-21-test_rsc_refactor_variant_tests branch July 21, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants